import request from '@/utils/request'

export function getDishes (params) {
  return request({
    url: '/dish/page',
    method: 'get',
    params
  })
}

export function deleteDishes (params) {
  return request({
    url: '/dish',
    method: 'delete',
    params
  })
}
export function changeDishes (status, params) {
  return request({
    url: `/dish/status/${status}`,
    method: 'post',
    params
  })
}

export function changeStatus (data) {
  return request({
    url: '/dish',
    method: 'put',
    data
  })
}

export function addDish (data) {
  return request({
    url: '/dish',
    method: 'post',
    data
  })
}

export function getDish (id) {
  return request({
    url: `/dish/${id}`,
    method: 'get'
  })
}
